package com.zxzw.scanningin.http


/**
 * @author zx
 * @date 2023/11/28 21:55
 * @desc 基础返回值
*/
open class BaseResponse(var success: Boolean = false, var message: String = "") {
    override fun toString(): String {
        return "BaseResponse(code=$success, msg='$message')"
    }
}

open class CodeResponse(
    var code: Int = 1,
    var msg: String = "",
    var img:String = "",
    var uuid:String = "",
    var captchaEnabled:Boolean = false,
) {
    override fun toString(): String {
        return "BaseResponse(code=$code, msg='$msg', img='$img', uuid='$uuid', captchaEnabled='$captchaEnabled')"
    }
}

open class LoginResponse(
    var code: Int = 1,
    var msg: String = "",
    var token:String = "",
)

open class TipInfoResponse(
    var code: Int = 1,
    var msg: String = "",
    var data: TipInfoBean? = null,
)
open class FaceOrNotResponse(
    var code: Int = 1,
    var msg: String = "",
    var data: FaceOrNotBean? = null,
)

data class MealBean(
    var orgName: String,
)
data class FaceOrNotBean(
    var isFace: String,//是否人脸识别：1-是，2-否
    var isSubsidy: String,//是否补贴用户：1-是，2-否，3-未知
    var spentAmount: String,//
)
data class TipInfoBean(
    var minSubsidyAmount: String,
    var maxSubsidyNum: String,
    var period: Array<String>,
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as TipInfoBean

        if (minSubsidyAmount != other.minSubsidyAmount) return false
        if (maxSubsidyNum != other.maxSubsidyNum) return false
        if (!period.contentEquals(other.period)) return false

        return true
    }

    override fun hashCode(): Int {
        var result = minSubsidyAmount.hashCode()
        result = 31 * result + maxSubsidyNum.hashCode()
        result = 31 * result + period.contentHashCode()
        return result
    }
}